#!/bin/env sh
set -e
if  [ "$ZOOKEEPER" != "" ] ;then
    sed -i "s|dubbo.registry.address=zookeeper://127.0.0.1:2181|dubbo.registry.address=zookeeper://${ZOOKEEPER}:2181|g" \
      $CATALINA_HOME/webapps/ROOT/WEB-INF/dubbo.properties;
    sh $CATALINA_HOME/bin/catalina.sh run
else
    echo "ZOOKEEPER must set!!!"
fi